<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		BMI:<input type="text" id="input1" />
		结果:<input type="text" id="input1" />
		<button onclick="check1()">判断是否及格</button>
		<button onclick="check2()">判断等级</button>
			
		
		
		<script>
			
		function check2() {
			var math = input1.value
			if (math < 20) {
				alert("体重过轻")
			} else if (math <= 25) {
				alert("体重适中")
			} else if (math <=30 ) {
				alert("体重过重")
			}
			else if (math <=35 ) {
				alert("肥胖")
			}
			else if (math >35 ) {
				alert("非常肥胖")
			}
		}
		
		</script>
	</body>
</html>
